<script setup lang="ts">
import { reactive } from 'vue'
import { Table, TableColumn } from '@/components/Table'
const { dataList } = defineProps({
  dataList: {
    type: Array,
    required: true
  }
})
const TableSchema = reactive<TableColumn[]>([
  {
    field: 'index',
    label: '序号',
    type: 'index'
  },
  {
    field: 'goods_name',
    label: '产品名称'
  },
  {
    field: 'spec_name',
    label: '规格'
  },
  {
    field: 'imgList',
    label: '图片',
    width: '100px'
  },
  {
    field: 'quantity',
    label: '数量'
  },
  {
    field: 'money',
    label: '单价（元）'
  },
  {
    field: 'amount',
    label: '总价（元）'
  }
])
</script>
<template>
  <Table
    :columns="TableSchema"
    :data="dataList"
    :image-preview="['imgList']"
    max-height="500"
    :show-overflow-tooltip="false"
  />
</template>
